Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLM Finetune with PEFT #99

Merged
merged 21 commits into from
May 23, 2024
Merged

Conversation

avishniakov
Copy link
Contributor

@avishniakov avishniakov commented Apr 12, 2024

This PR brings in the pipeline to run Mistral model fine-tuning using PEFT library on Viggio dataset.

Key highlights:

  • Project has one pipeline to run the full cycle of LLM fine-tuning:
    • Data extraction and preparation
    • Finetuning base model on new data
    • Evaluation of the performances for base and fine-tuned model
    • Promotion of the model to the target environment, if it outperforms the base and currently promoted one
  • Model can be trained on local(remote) orchestrator in full
  • Model can be trained on step operators, where only GPU intense steps will be pushed to step operator (we used Vertex AI step operator)
  • Here we also move around the previous LitGPT fine-tune project to llm-litgpt-finetuning and this new project becomes llm-lora-finetuning

P.S. Diff is a bit off due to project movement. LitGPT one was lift and shift - no changes in it.

Template update: zenml-io/template-llm-finetuning#4

Copy link

dagshub bot commented Apr 12, 2024

@strickvl
Copy link
Contributor

@coderabbitai review

@strickvl strickvl added enhancement New feature or request internal labels Apr 12, 2024
Copy link
Contributor

@strickvl strickvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial quick read. Looks good. Will read more thoroughly on Monday. Nice work on this!

llm-peft-finetune.tar.gz Outdated Show resolved Hide resolved
llm-lora-finetuning/README.md Outdated Show resolved Hide resolved
llm-lora-finetuning/run.py Outdated Show resolved Hide resolved
llm-lora-finetuning/steps/evaluate_model.py Show resolved Hide resolved
llm-lora-finetuning/utils/loaders.py Outdated Show resolved Hide resolved
Copy link
Contributor

@strickvl strickvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not much else to say beyond these comments (and the ones from before). Looks good overall.

llm-lora-finetuning/requirements.txt Show resolved Hide resolved
llm-lora-finetuning/utils/callbacks.py Show resolved Hide resolved
@avishniakov avishniakov requested a review from strickvl April 15, 2024 08:57
Copy link
Contributor

@schustmi schustmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few tiny nits, lgtm otherwise

llm-lora-finetuning/utils/logging.py Outdated Show resolved Hide resolved
llm-lora-finetuning/pipelines/train.py Outdated Show resolved Hide resolved
llm-lora-finetuning/pipelines/train.py Outdated Show resolved Hide resolved
@avishniakov avishniakov requested a review from schustmi April 16, 2024 08:41
@avishniakov
Copy link
Contributor Author

@htahir1 are we ok to merge this? It will replace the current LORA example with PEFT one and LitGPT will be moved to a new directory. Any blockers?

@schustmi
Copy link
Contributor

Just one more thing that came to my mind: We should probably also rename the llm-lora-finetuning template right?

safoinme added a commit that referenced this pull request Apr 25, 2024
safoinme added a commit that referenced this pull request May 8, 2024
@avishniakov avishniakov merged commit 5fc690d into main May 23, 2024
1 of 3 checks passed
@avishniakov avishniakov deleted the feature/OSSK-499-llm-finetune-with-peft branch May 23, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants